<?php

defined('EN_CODE') or die(__FILE__.': Direct Access Denied');

$content = '';
$message = '';
$message_type = 'info';
$parameters = explode('/', $request->getPathInfo());

switch ($parameters[1]) {
  case 'usuarios':
    include BASE_DIR.'bundles/usuarios/controller.php';
    break;
  case 'compras':
    include BASE_DIR.'bundles/compras/controller.php';
    break;
  case 'proveedores':
    include BASE_DIR.'bundles/proveedores/controller.php';
    break;
  case 'tipos':
     include BASE_DIR.'bundles/tipos/controller.php';
     break;
  case 'marcas':
    include BASE_DIR.'bundles/marcas/controller.php';
    break;
  case 'clientes':
    include BASE_DIR.'bundles/clientes/controller.php';
    break;
  case 'ventas':
    include BASE_DIR.'bundles/ventas/controller.php';
    break;
  case 'reportes':
    include BASE_DIR.'bundles/reportes/controller.php';
    break;
  case 'productos':
  case '':
  case 'index':
  case 'index.html':
  case 'index.php':
    include BASE_DIR.'bundles/productos/controller.php';
    break;
  case 'ayuda':
    include BASE_DIR.'bundles/ayuda/controller.php';
    break;
  default:
    $title = 'Ups!';
    $content = $helper->include_template('error/server_error', array('message'=>'No se encontró la página que está buscando'));
    $slug = '';
    $response->setStatusCode(404);
    break;
}

?>
